<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>修改密码</title>
</head>
<body>
	<article>
		<header>
			<h1>修改密码</h1>
		</header>
		<form>
			<p>
				<label>旧密码:<input name="oldPassword"></label>
			</p>
			<p>
				<label>新密码:<input name="newPassword"></label>
			</p>
			<p>
				<label>新密码确认:<input name="newPasswordConfirm"></label>
			</p>
			<p>
				<button type="submit">确定</button>
				<a href="welcome.html">返回</a>

			</p>
		</form>
	</article>
	<script src="/static/js/axios.min.js"></script>
	<script src="/static/js/vue.js"></script>
    <script src="/static/js/yi.toast.js"></script>
	<script>
		$("form").submit(
				function(evt) {
					evt.preventDefault();

					$.post("/modifyUserPassword.do", $(this).serialize()).then(
							function(resp) {
								if (resp.code !== "ok") {
									$("#message").text(resp.message);
									return;
								}
								alert("修改密码成功,请重新登录");
								window.top.location.href = "/";
							});

				});
	</script>

</body>
</html>